package com.zbkj.service.dao.client;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zbkj.common.model.client.agent.ClientSystemNotice;
import com.zbkj.common.vo.SystemNoticeVo;
import org.apache.ibatis.annotations.Param;

/**
 * 客户端系统通知表 Mapper 接口
 * +----------------------------------------------------------------------
 * | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
 * +----------------------------------------------------------------------
 * | Author: CRMEB Team <admin@crmeb.com>
 * +----------------------------------------------------------------------
 */
public interface ClientSystemNoticeDao extends BaseMapper<ClientSystemNotice> {

    /**
     * 分页查询系统通知列表（连表查询用户已读状态）
     * @param page 分页参数
     * @param userId 用户ID
     * @param merId 租户ID
     * @param isRead 是否已读过滤条件（可选）
     * @return 分页结果
     */
    IPage<SystemNoticeVo> selectNoticeListWithReadStatus(Page<SystemNoticeVo> page, 
                                                       @Param("userId") Integer userId, 
                                                       @Param("merId") Integer merId,
                                                       @Param("isRead") Integer isRead);

} 